//
//  IMMessageModel.m
//  YSSmartHome
//
//  Created by yanghao on 27/05/2017.
//  Copyright © 2017 yahaong. All rights reserved.
//

#import "IMMessageModel.h"
#import "JSQMessages.h"
#import "IMConfig.h"
#import "UIImage+Extension.h"
@implementation IMMessageModel
- (instancetype)init
{
    self = [super init];
    if (self) {
        
        JSQMessagesAvatarImage *meImage = [JSQMessagesAvatarImage avatarWithImage:[UIImage imageNamed:@"Avatar_me"]];
        
        JSQMessagesAvatarImage *adminImage = [JSQMessagesAvatarImage avatarWithImage:[UIImage imageNamed:@"Avatar_other"]];
        self.avatars = @{ ZTAvatarIdMe : meImage,
                          ZTAvatarIdAdmin : adminImage };
        self.users = @{ ZTAvatarIdMe : ZTAvatarDisplayNameMe,
                       ZTAvatarIdAdmin : ZTAvatarDisplayNameAdmin };
        self.outgoingBubbleImageData = [[JSQMessagesBubbleImage alloc]initWithMessageBubbleImage:[UIImage resizableImage:@"chat_send_nor"] highlightedImage:[UIImage resizableImage:@"chat_send_press_pic"]];
        self.incomingBubbleImageData = [[JSQMessagesBubbleImage alloc]initWithMessageBubbleImage:[UIImage resizableImage:@"chat_recive_nor"]  highlightedImage:[UIImage resizableImage:@"chat_recive_press_pic"]];
        self.messages = [NSMutableArray array];
    }
    return self;
}


@end
